<template>
<view>
<view @tap="hideModal" catchtouchmove="preventTouchMove" id="modal-mask" v-if="showModal"></view>
<view class="modal-dialog" v-if="showModal">
    <view @tap="close_box">
        <image class="close3" :src="__wxapp_img.store.close3.url"></image>
    </view>
    <view class="modal-title" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">{{goods_name}}</view>
    <scroll-view scroll-y="true" style="height: 100%;">
        <view class="modal-content">
            <view>
                <view v-for="(attr_group, index) in attr_group_list" :key="index" class="attr-group" v-if="attr_group.attr_list.length>0">
                    <view class="attr-group-name">{{attr_group.attr_group_name}} :</view>
                    <view class="attr-list">
                        <text v-for="(item, index2) in attr_group.attr_list" :key="index2" @tap="attrClick" :class="'attr_name ' + (item.checked?'active':'')" :data-group-id="attr_group.attr_group_id" :data-id="item.attr_id">{{item.attr_name}}</text>
                    </view>
                </view>
            </view>
        </view>
    </scroll-view>
    <view class="modal-footer">
        <view class="guigeprice" v-if="check_goods_price">￥{{check_goods_price}}</view>
        <view class="guigeprice" v-else>￥{{temporaryGood.price}}</view>
        <view class="btn-car_num" v-if="check_num">
            <image @tap="guigejian" class="carStandard" :src="__wxapp_img.store.jian.url"></image>
            <text class="carStandard">{{check_num}}</text>
            <image @tap="onConfirm" class="carStandard" :src="__wxapp_img.store.jia.url"></image>
        </view>
        <view @tap="onConfirm" class="btn-car" data-status="confirm" style="background:#FF4544;color:#FFFFFF;" v-else>加入购物车</view>
    </view>
</view>
</view>
</template>

<style>
@import "./specifications.css";
</style>